// 统一请求路径前缀在libs/axios.js中修改
import {
  postRequest,
  getRequest,
  deleteRequest,
  uploadFile,
  communityUrl,
  managerUrl,
} from "@/libs/axios";

// 获取文件信息
export const getFileInfo = (userRegisterId)=>{
  return getRequest(`${managerUrl}/manager/user/userRegister/prescriptionDetails/${userRegisterId}`)
};
// 获取关键字列表
export const keywordList = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/topic/kwlistIndex`, params, headers);
};

// 关键字添加
export const keywordAdd = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/topic/kwlistAdd`, params, headers);
};

// 关键字编辑
export const keywordEdit = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/topic/kwlistTypeEdit`, params, headers);
};

// 关键字删除
export const keywordDel = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/topic/kwlistDel`, params, headers);
};

// 话题列表
export const topicList = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/topic`, params, headers);
};

// 设置精华帖
export const topicBoutique = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/topic/set_jht`, params, headers);
};

// 删除话题
export const delTopic = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/topic/deltopic`, params, headers);
};

// 根据ID查询话题详情及评论
export const topicDetail = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/topic/detailtopic`, params, headers);
};

// 话题审核
export const topicExamine = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/topic/passtopic`, params, headers);
};

// 获取评论列表
export const commentList = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/comments`, params, headers);
};

// 评论显示与隐藏
export const commentDisplay = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/comments/discoment`, params, headers);
};

// 评论删除
export const delComment = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/comments/delcomments`, params, headers);
};

// 获取活动列表
export const activityList = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/activity`, params, headers);
};

// 删除活动
export const activityDel = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/activity/delivity`, params, headers);
};

// 活动详情
export const activityDetail = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/activity/seedetailvity`, params, headers);
};

// 新增活动
export const activityAdd = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return postRequest(`${communityUrl}/api/activity/add`, params, headers);
};

// 编辑活动
export const activityEdit = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return postRequest(`${communityUrl}/api/activity/detailvity`, params, headers);
};

// 获取活动报名人数列表
export const activityMember = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/activity/avmember`, params, headers);
};

// 上传基地封面
export const postUpload = (params) => {
  let headers = { 'Content-Type': 'multipart/form-data' };
  return postRequest(uploadFile, params, headers);
};

// 获取圈子列表
export const circleList = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/circle`, params, headers);
};

// 圈子详情
export const circleDetail = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/circle/detai`, params, headers);
};

// 新增圈子
export const circleAdd = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/circle/add`, params, headers);
};

// 编辑圈子
export const circleEdit = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/circle/detailvity`, params, headers);
};

// 删除圈子
export const circleDel = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/circle/del`, params, headers);
};

// 圈子置顶
export const circleTop = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/circle/pushtop`, params, headers);
};

// 获取认证列表
export const authenList = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/authentication`, params, headers);
};

// 认证审核
export const authenAudit = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/authentication/audit`, params, headers);
};

// 获取认证类型列表
export const authenTypelist = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/authentication/typelist`, params, headers);
};

// 新增认证类型
export const authenTypeAdd = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/authentication/add`, params, headers);
};

// 删除认证类型
export const authenTypeDel = (params) => {
  let headers = { "Content-Type": "multipart/form-data"}
  return getRequest(`${communityUrl}/api/authentication/del`, params, headers);
};

// 获取动态管理列表
export const dynamicList = (params) => {
  let headers = { "Content-Type": "application/json"}
  return postRequest(`${managerUrl}/manager/dynamic/expertDynamic/page`, params, headers);
};

// 动态详情
export const dynamicDetail = (id) => {
  return getRequest(`${managerUrl}/manager/dynamic/expertDynamic/${id}`);
};

// 动态审核
export const dynamicExamine = (params) => {
  return getRequest(`${managerUrl}/manager/dynamic/expertDynamic/examine`, params);
};

// 删除动态
export const dynamicDel = (ids) => {
  return deleteRequest(`${managerUrl}/manager/dynamic/expertDynamic/${ids}`);
};